﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace PreferredZhiTu.Views
{
    public partial class XingCheng : PhoneApplicationPage
    {
        public XingCheng()
        {
            InitializeComponent();
        }

       
        private void button4_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Views/JingDian.xaml?selectItem=" + listBox3.SelectedIndex, UriKind.Relative));
        }

        public string selectname;
        private void listBox4_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListBox lb = sender as ListBox;
            ListBoxItem item = lb.SelectedItem as ListBoxItem;
            
            if (null != item)
            {
                selectname = item.Content.ToString();
                MessageBox.Show(selectname);
            }
            NavigationService.Navigate(new Uri("/Views/JingDian.xaml", UriKind.Relative));
        }


        private void listBox3_Loaded(object sender, RoutedEventArgs e)
        {//加载数据条数
            listBox3.Items.Clear();
            for (int i = 0; i < 10; i++)
            {
                listBox3.Items.Add(i);
            }
        }
    }
}